<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Hello World!</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>v-model</h1>
    <hr>
    <div id="app">
        {{message}} jspang
        <br>
        <P>v-model: <input type="text" v-model="message"></P>
        <P>v-model.lazy:<input type="text" v-model.lazy="message"></P> 
        <P>v-model.number: <input type="text" v-model.number="message"></P>
        <P>v-model.trim: <input type="text" v-model.trim="message"></P>

        <h3>
            文本域
        </h3>
        <textarea v-model="message" cols="30" rows="10"></textarea>
        <h3>复选框绑定一个值</h3>
        <input type="checkbox" id="isTrue" v-model="isTrue">
        <label for="isTrue">{{isTrue}}</label>

        <h3>复选框绑定数组</h3>
        <input type="checkbox" id="jspang" value="jspang" v-model="web_names">
        <label for="isTrue">{{jspang}}</label>
        <input type="checkbox" id="panda" value="panda" v-model="web_names">
        <label for="isTrue">{{panda}}</label>
        <input type="checkbox" id="panpan" value="panpan" v-model="web_names">
        <label for="isTrue">{{panpan}}</label>

        <p>{{web_names}}</p>

        <h3>单选框绑定一个值</h3>
        <input type="radio" id="one" value="男" v-model="sex">
        <label for="one">男</label>
        <input type="radio" id="two" value="女" v-model="sex">
        <label for="two">女</label>

        <P>您选择的性别是:{{sex}}</P>
    </div>

    <script type="text/javascript">
        var app=new Vue({
            el:"#app",
            data:{
                message:'Hello World!',
                isTrue:true,
                web_names:[],
                sex:'男'
            }
        })
    </script>
</body>
</html>